<?php

class Zend_View_Helper_Leftcrawlproduct
{
	public function leftcrawlproduct()
	{		
		//左侧爬虫产品
		$myCache = Zend_Registry::get('myCache');
		$uriKey = md5($_SERVER ['REQUEST_URI'].'_'.date('Y-m-d'));
		$leftShowProduct = $myCache->load('request_uri_crawl_'.$uriKey);
		if(!$leftShowProduct){
			$maxCrawlId = CCache::getCrawlMaxId()+1;
			$idArray = array(mt_rand(1,$maxCrawlId),mt_rand(1,$maxCrawlId),mt_rand(1,$maxCrawlId),mt_rand(1,$maxCrawlId),mt_rand(1,$maxCrawlId));
			$crawl = new CCrawl();
			$leftShowProduct = $crawl->getCrawlItems($idArray);
			$myCache->save($leftShowProduct,'request_uri_crawl_'.$uriKey);
		}
		return $leftShowProduct;
	}

}

